﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MessageSystem.Managed;
using MessageSystem.Managed.Interface;

namespace MessageSystem.Managed.Rpc
{
    public class RpcAsynCallback
    {
        private RpcSessionService session_;
        private bool encrypt_;
        private int  opcode_;

        public RpcAsynCallback(RpcSessionService ss, bool encrypt, int opcode)
        {
            session_ = ss;
            encrypt_ = encrypt;
            opcode_ = opcode;
        }

        protected void Callback(IMessage message)
        {
            session_.FromServiceReturn(message, encrypt_, opcode_);
        }
    }
}
